3.3.41 \(\int \frac {(c (d \sec (e+f x))^p)^n}{(a+b \sec (e+f x))^2} \, dx\) [241]

3.3.41.1 Optimal result
3.3.41.2 Mathematica [B] (warning: unable to verify)
3.3.41.3 Rubi [A] (verified)
3.3.41.4 Maple [F]
3.3.41.5 Fricas [F]
3.3.41.6 Sympy [F]
3.3.41.7 Maxima [F]
3.3.41.8 Giac [F]
3.3.41.9 Mupad [F(-1)]

3.3.41.1 Optimal result

Integrand size = 27, antiderivative size = 322 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=-\frac {2 a b \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-2+n p),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {a^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-3+n p),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {b^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1+n p),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f} \]

output
-2*a*b*AppellF1(1/2,1/2*n*p-1,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2 
))*(cos(f*x+e)^2)^(1/2*n*p)*(c*(d*sec(f*x+e))^p)^n*sin(f*x+e)/(a^2-b^2)^2/ 
f+a^2*AppellF1(1/2,1/2*n*p-3/2,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^ 
2))*cos(f*x+e)*(cos(f*x+e)^2)^(1/2*n*p-1/2)*(c*(d*sec(f*x+e))^p)^n*sin(f*x 
+e)/(a^2-b^2)^2/f+b^2*AppellF1(1/2,1/2*n*p-1/2,2,3/2,sin(f*x+e)^2,a^2*sin( 
f*x+e)^2/(a^2-b^2))*cos(f*x+e)*(cos(f*x+e)^2)^(1/2*n*p-1/2)*(c*(d*sec(f*x+ 
e))^p)^n*sin(f*x+e)/(a^2-b^2)^2/f
 
3.3.41.2 Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(14108\) vs. \(2(322)=644\).

Time = 46.81 (sec) , antiderivative size = 14108, normalized size of antiderivative = 43.81 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\text {Result too large to show} \]

input
Integrate[(c*(d*Sec[e + f*x])^p)^n/(a + b*Sec[e + f*x])^2,x]
 
output
Result too large to show
 
3.3.41.3 Rubi [A] (verified)

Time = 0.90 (sec) , antiderivative size = 330, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3042, 4436, 3042, 4356, 3042, 3303, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2}dx\)

\(\Big \downarrow \) 4436

\(\displaystyle (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n \int \frac {(d \sec (e+f x))^{n p}}{(a+b \sec (e+f x))^2}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n \int \frac {\left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{n p}}{\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\)

\(\Big \downarrow \) 4356

\(\displaystyle \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n \int \frac {\cos ^{2-n p}(e+f x)}{(b+a \cos (e+f x))^2}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^{2-n p}}{\left (b+a \sin \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\)

\(\Big \downarrow \) 3303

\(\displaystyle \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n \int \left (\frac {b^2 \cos ^{2-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}-\frac {2 a b \cos ^{3-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}+\frac {a^2 \cos ^{4-n p}(e+f x)}{\left (a^2 \cos ^2(e+f x)-b^2\right )^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n \left (-\frac {2 a b \sin (e+f x) \cos ^2(e+f x)^{\frac {n p}{2}} \cos ^{-n p}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (n p-2),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}+\frac {a^2 \sin (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (n p-1)} \cos ^{1-n p}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (n p-3),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}+\frac {b^2 \sin (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (n p-1)} \cos ^{1-n p}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (n p-1),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}\right )\)

input
Int[(c*(d*Sec[e + f*x])^p)^n/(a + b*Sec[e + f*x])^2,x]
 
output
Cos[e + f*x]^(n*p)*(c*(d*Sec[e + f*x])^p)^n*((-2*a*b*AppellF1[1/2, (-2 + n 
*p)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*(Cos[e + 
f*x]^2)^((n*p)/2)*Sin[e + f*x])/((a^2 - b^2)^2*f*Cos[e + f*x]^(n*p)) + (a^ 
2*AppellF1[1/2, (-3 + n*p)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2) 
/(a^2 - b^2)]*Cos[e + f*x]^(1 - n*p)*(Cos[e + f*x]^2)^((-1 + n*p)/2)*Sin[e 
 + f*x])/((a^2 - b^2)^2*f) + (b^2*AppellF1[1/2, (-1 + n*p)/2, 2, 3/2, Sin[ 
e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]^(1 - n*p)*(Cos[ 
e + f*x]^2)^((-1 + n*p)/2)*Sin[e + f*x])/((a^2 - b^2)^2*f))
 

3.3.41.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3303
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*( 
x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(d*sin[e + f*x])^n*(1/((a - b*sin[ 
e + f*x])^m/(a^2 - b^2*sin[e + f*x]^2)^m)), x], x] /; FreeQ[{a, b, d, e, f, 
 n}, x] && NeQ[a^2 - b^2, 0] && ILtQ[m, -1]
 

rule 4356
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_.), x_Symbol] :> Simp[Sin[e + f*x]^n*(d*Csc[e + f*x])^n   Int[(b + 
 a*Sin[e + f*x])^m/Sin[e + f*x]^(m + n), x], x] /; FreeQ[{a, b, d, e, f, n} 
, x] && NeQ[a^2 - b^2, 0] && IntegerQ[m]
 

rule 4436
Int[((c_.)*((d_.)*sec[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sec[(e 
_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Simp[c^IntPart[n]*((c*(d*Sec[e + f*x 
])^p)^FracPart[n]/(d*Sec[e + f*x])^(p*FracPart[n]))   Int[(a + b*Sec[e + f* 
x])^m*(d*Sec[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, 
x] &&  !IntegerQ[n]
 
3.3.41.4 Maple [F]

\[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +b \sec \left (f x +e \right )\right )^{2}}d x\]

input
int((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x)
 
output
int((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x)
 
3.3.41.5 Fricas [F]

\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="fricas")
 
output
integral(((d*sec(f*x + e))^p*c)^n/(b^2*sec(f*x + e)^2 + 2*a*b*sec(f*x + e) 
 + a^2), x)
 
3.3.41.6 Sympy [F]

\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{\left (a + b \sec {\left (e + f x \right )}\right )^{2}}\, dx \]

input
integrate((c*(d*sec(f*x+e))**p)**n/(a+b*sec(f*x+e))**2,x)
 
output
Integral((c*(d*sec(e + f*x))**p)**n/(a + b*sec(e + f*x))**2, x)
 
3.3.41.7 Maxima [F]

\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="maxima")
 
output
integrate(((d*sec(f*x + e))^p*c)^n/(b*sec(f*x + e) + a)^2, x)
 
3.3.41.8 Giac [F]

\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="giac")
 
output
integrate(((d*sec(f*x + e))^p*c)^n/(b*sec(f*x + e) + a)^2, x)
 
3.3.41.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx=\int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{{\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]

input
int((c*(d/cos(e + f*x))^p)^n/(a + b/cos(e + f*x))^2,x)
 
output
int((c*(d/cos(e + f*x))^p)^n/(a + b/cos(e + f*x))^2, x)